<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include::header('项目设置')" />
</head>
    <body class="febs-container" id="febs-baseProject">
        <div class="febs-body layui-fluid" lay-title="项目设置">
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="baseProject-table-form" id="baseProject-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" id="post-tenant" th:if="${hasHeadCompanyRole }">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" t>
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${currentTenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">项目类型</label>
                                    <div class="layui-input-inline">
                                        <select name="projectType" id="projectType" lay-search="">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">项目名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="projectName" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">项目状态</label>
                                    <div class="layui-input-inline">
                                        <select name="status">
                                            <option value="">全部</option>
                                            <option value="1">在建</option>
                                            <option value="2">已交付</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="baseProjectTable" lay-data="{id: 'baseProjectTable'}"></table>
            </div>

        </div>
        <th:block th:include="include::foot"/>
        <script type="text/html" id="baseProject-toolbar">
            <div lay-event="add" class="layui-btn layui-btn-sm">
                <em class="layui-icon">&#xe654;</em> 新增
            </div>
        </script>
        <script type="text/html" id="baseProject-option">
            <span shiro:lacksPermission="baseProject:update,baseProject:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="baseProject:update">
                <i class="layui-icon layui-icon-edit"></i>
                编辑
            </button>
            <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="baseProject:delete">
                <i class="layui-icon layui-icon-delete"></i>
                删除
            </button>
        </script>
        <script data-th-inline="javascript">
            currentTenantId = [[${tenantId}]],
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
        </script>
        <script th:src="@{/febs/js/base/baseProject/baseProjectList.js(v=1)}"></script>
    </body>
</html>